package com.zhss.dfs.server.model;

import com.zhss.dfs.server.FSDirectory;

import java.util.LinkedList;
import java.util.List;

/**
 * @description:
 * @Author liu Weidong
 * @Email:
 * @Date: 2024/5/11 14:48
 * @Version 1.0
 */
public class INode {
    /**
     * 路径
     */
    private String path;
    /**
     * 子目录
     */
    private List<INode> children;
    /**
     * 0 目录 1 文件
     */
    private Integer type;

    public INode(String path, Integer type) {
        this.path = path;
        this.children = new LinkedList<INode>();
        this.type = type;
    }

    public INode(){
        
    }

    public void addChild(INode inode) {
        this.children.add(inode);
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public List<INode> getChildren() {
        return children;
    }

    public void setChildren(List<INode> children) {
        this.children = children;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
